IdeaBlade.Linq Assembly > IdeaBlade.Linq Namespace > PredicateBuilder Class > Or Method : Or(IPredicateDescription[]) Method |
'Declaration
Public Overloads Shared Function Or( _ ByVal ParamArray predicateDescriptions() As IPredicateDescription _ ) As CompositePredicateDescription
'Usage
Dim predicateDescriptions() As IPredicateDescription Dim value As CompositePredicateDescription value = PredicateBuilder.Or(predicateDescriptions)
public static CompositePredicateDescription Or( params IPredicateDescription[] predicateDescriptions )
var mgr = new DomainModelEntityManager(); var expr1 = new PredicateDescription(typeof(Customer), "Country", FilterOperator.IsEqualTo, "Mexico"); var expr2 = new PredicateDescription(typeof(Customer), "CompanyName", FilterOperator.StartsWith, "A"); // Where companyname starts with A or country = mexico var finalcrit = PredicateBuilder.Or(expr1, expr2); var query = mgr.Customers.Where(finalcrit); var list = query.ToList();
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2